y
Hello, Team please help me solve an issue I need to play several separate messages using Vapi from my custom server. first, I tried creating two separate streams — but in that case, only the first message gets played. then, I tried using streaming chunks — but for some reason, Vapi still waits until all the chunks are received before starting playback (i.e., when I send finish_reason: 'stop' and data: [DONE]). If I send them earlier, the rest of the message doesn't get played by Vapi 😫 Could you please advise me on how to fix this?
s
The flush syntax in Vapi which allows for immediately flushing custom alarm outputs. This feature helps control when output is immediately sent to text-to-speech (TTS) systems rather than waiting
Flush Syntax Patterns Based on my analysis of the Vapi codebase, here are the possible patterns for using the flush syntax: Self-closing tag: Self-closing tag with space: Opening and closing tags:
Copy code
"Hello, this is an urgent message. <flush/> Please respond immediately."
In this example, "Hello, this is an urgent message." will be sent to TTS immediately, followed by "Please respond immediately." in normal processing.
Copy code
"Emergency notification. <flush/> Your security system has been triggered. <flush/> Please check your mobile app for details."
This creates two immediate flush points, sending each segment to TTS as soon as it's processed.
y
HUUUGE thanks! 🔥 is working 👍
s
ccing: @Kings_big💫 For your information